home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9512 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  875 b 

  1. Path: news.itd.umich.edu!stimpy!speng
  2. From: speng@stimpy.us.itd.umich.edu (Steve Palmer Peng)
  3. Newsgroups: comp.lang.c
  4. Subject: Kind of an annoying question...
  5. Date: 11 Mar 1996 00:19:36 GMT
  6. Organization: University of Michigan
  7. Message-ID: <4hvrio$c4k@lastactionhero.rs.itd.umich.edu>
  8. NNTP-Posting-Host: stimpy.us.itd.umich.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. I'm wondering, just what function in C allows me to enter a character
  12. from the keyboard, and it automatically executes the command I designate
  13. that character to.  For instance, I have something like,
  14.  
  15. printf("Enter Y or N:");
  16.  
  17. and I want the command after the printf statement to wait for input
  18. from the keyboard, but once someone enters a Y or an N, the next line of
  19. code is executed, without hitting enter.  Does anyone know how?  It would
  20. be greatly appreciated if someone could help me out here...
  21.  
  22. Steve
  23.  
  24.  
  25.